<?php
include_once ('class/autoload.php'); // pour inclure nos classes
$site = new page_securisee ( 'Statistiques', "Statistiques", "" );

$corps = '<div class="well" onclick="afficheGraphDuree()">Afficher graphique durée/Nb appels</div>
		<div id="graphAppelsTemps">
		<input type="radio" id="tous" name="radioChoix" onchange=selectRadioDuree() value="tous">Tous les appels
		<input type="radio" id="radiofiltre" name="radioChoix" onchange=selectRadioDuree() value="filtrer">Filtrer
		<input type="radio" id="RadioTech" name="radioChoixFiltre" onchange=selectRadioDuree() value="parTech" style="display:none;">Technicien
		<select name="tech" id="Tech" style="display:none;" >
 		
		<option></option>';
$query = 'SELECT * FROM utilisateurs WHERE idtype_compte = 1 ';
$return = $connexion->query ( $query );

while ( $row = $return->fetch () ) {
	$corps .= '<option value=' . $row ['id'] . '>' . $row ['identifiant'] . '</option>';
}
$corps .= '</select>
		<input type="button" name="OkTech" id="OkTech" style="display:none;" value="OK" onclick=afficheGraphParTech()>
		
		<input type="radio" id="RadioDate" name="radioChoixFiltre" onchange=selectRadioDuree() value="parDate" style="display:none;">Date
		<select name="mois" id="Mois"  class="form-control" style="display:none;" >
			<option value="1">Janvier</option>
			<option value="2">Fevrier</option>
			<option value="3">Mars</option>
			<option value="4">Avril</option>
			<option value="5">Mai</option>
			<option value="6">Juin</option>
			<option value="7">Juillet</option>
			<option value="8">Aout</option>
			<option value="9">Septembre</option>
			<option value="10">Octobre</option>
			<option value="11">Novembre</option>
			<option value="12">Decembre</option>
		</select>
		<input type="button" name="OkDate" id="OkDate" style="display:none;" value="OK" onclick=afficheGraphParDate()>
		
		
		
		<div id="TempsNbAppels" style="height: 400px"></div>
		</div>
		<div class="well" onclick="afficheGraphCamenbert()">Afficher camenbert des problématiques</div>
		<div id="camenbertProblematique">
			<input type="radio" id="date" name="date" onchange=selectRadio() value="tous">Tous les appels
			<input type="radio" id="date2" name="date" onchange=selectRadio() value="specifique">Par date
	 		<input type="text" name="dateDebut" id="dateDebut" style="display:none;" placeholder="Debut plage date" >
			<input type="text" name="dateFin" id="dateFin" style="display:none;" placeholder="Fin plage date">
	 		<input type="button" name="dateFin" id="OK" style="display:none;" value="OK" onclick=afficheGraph()>
	 		<div id="camenbertProbl" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div><br>
 		</div>
		';
$site->corps = $corps;
$site->affiche ();
?>